/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GUI_Principal.java
 *
 * Created on 15/05/2012, 12:46:40 AM
 */
package Interfaz_Grafica;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Miguel
 */
public class GUI_Principal extends javax.swing.JFrame {

    /** Creates new form GUI_Principal */
    public GUI_Principal() {
        initComponents();

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jtpSeguridad = new javax.swing.JTabbedPane();
        PaneGeneral = new javax.swing.JPanel();
        PersonasBTN = new javax.swing.JButton();
        VehiculoBTN = new javax.swing.JButton();
        LineaBTN = new javax.swing.JButton();
        EmpresasBTN = new javax.swing.JButton();
        PaneRuta = new javax.swing.JPanel();
        RutaBTN = new javax.swing.JButton();
        PlantillaHorarioBTN = new javax.swing.JButton();
        AsignacionHorarioBTN = new javax.swing.JButton();
        PaneSeguridad = new javax.swing.JPanel();
        PaneUbicacion = new javax.swing.JPanel();
        TipoViaBTN = new javax.swing.JButton();
        ViaBTN = new javax.swing.JButton();
        DistritoBTN = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Mantenimientos");
        setName("Mantenimiento"); // NOI18N

        PersonasBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/imagesCAKC2060.jpg"))); // NOI18N
        PersonasBTN.setLabel("Personas");
        PersonasBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                vntPersonas(evt);
            }
        });

        VehiculoBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/untitled.png"))); // NOI18N
        VehiculoBTN.setLabel("Vehiculo");
        VehiculoBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                VehiculoBTNActionPerformed(evt);
            }
        });

        LineaBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/imagesCA53J8YZ.jpg"))); // NOI18N
        LineaBTN.setLabel("Lineas");
        LineaBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LineaBTNActionPerformed(evt);
            }
        });

        EmpresasBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/empresa.png"))); // NOI18N
        EmpresasBTN.setLabel("Empresas");
        EmpresasBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EmpresasBTNActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout PaneGeneralLayout = new javax.swing.GroupLayout(PaneGeneral);
        PaneGeneral.setLayout(PaneGeneralLayout);
        PaneGeneralLayout.setHorizontalGroup(
            PaneGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PaneGeneralLayout.createSequentialGroup()
                .addGroup(PaneGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PaneGeneralLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(LineaBTN))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PaneGeneralLayout.createSequentialGroup()
                        .addContainerGap(176, Short.MAX_VALUE)
                        .addComponent(EmpresasBTN)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(PaneGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PaneGeneralLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(PersonasBTN))
                    .addGroup(PaneGeneralLayout.createSequentialGroup()
                        .addGap(133, 133, 133)
                        .addComponent(VehiculoBTN)))
                .addGap(194, 194, 194))
        );
        PaneGeneralLayout.setVerticalGroup(
            PaneGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PaneGeneralLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PaneGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PaneGeneralLayout.createSequentialGroup()
                        .addComponent(PersonasBTN)
                        .addGap(49, 49, 49)
                        .addComponent(VehiculoBTN))
                    .addGroup(PaneGeneralLayout.createSequentialGroup()
                        .addComponent(LineaBTN)
                        .addGap(36, 36, 36)
                        .addComponent(EmpresasBTN)))
                .addGap(381, 381, 381))
        );

        jtpSeguridad.addTab("General", PaneGeneral);

        RutaBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/untitled_1.png"))); // NOI18N
        RutaBTN.setText("Luz Roja");

        PlantillaHorarioBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/untitled_2.png"))); // NOI18N
        PlantillaHorarioBTN.setText("Exceso Velosidad");

        AsignacionHorarioBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/imagesCASJS7BY.jpg"))); // NOI18N
        AsignacionHorarioBTN.setText("Accidentes");

        javax.swing.GroupLayout PaneRutaLayout = new javax.swing.GroupLayout(PaneRuta);
        PaneRuta.setLayout(PaneRutaLayout);
        PaneRutaLayout.setHorizontalGroup(
            PaneRutaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PaneRutaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PaneRutaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PaneRutaLayout.createSequentialGroup()
                        .addComponent(PlantillaHorarioBTN)
                        .addGap(449, 449, 449))
                    .addGroup(PaneRutaLayout.createSequentialGroup()
                        .addComponent(RutaBTN)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 268, Short.MAX_VALUE)
                        .addComponent(AsignacionHorarioBTN)
                        .addGap(105, 105, 105))))
        );
        PaneRutaLayout.setVerticalGroup(
            PaneRutaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PaneRutaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PaneRutaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RutaBTN)
                    .addComponent(AsignacionHorarioBTN))
                .addGap(54, 54, 54)
                .addComponent(PlantillaHorarioBTN)
                .addContainerGap(49, Short.MAX_VALUE))
        );

        jtpSeguridad.addTab("Reportes", PaneRuta);

        javax.swing.GroupLayout PaneSeguridadLayout = new javax.swing.GroupLayout(PaneSeguridad);
        PaneSeguridad.setLayout(PaneSeguridadLayout);
        PaneSeguridadLayout.setHorizontalGroup(
            PaneSeguridadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 909, Short.MAX_VALUE)
        );
        PaneSeguridadLayout.setVerticalGroup(
            PaneSeguridadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 524, Short.MAX_VALUE)
        );

        jtpSeguridad.addTab("Monitoreo", PaneSeguridad);

        TipoViaBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/images.jpg"))); // NOI18N
        TipoViaBTN.setText("Rol");
        TipoViaBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TipoViaBTNActionPerformed(evt);
            }
        });

        ViaBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/imagesCAFZFZT0.jpg"))); // NOI18N
        ViaBTN.setText("Usuarios");
        ViaBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ViaBTNActionPerformed(evt);
            }
        });

        DistritoBTN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Utilitarios/imagesCA0K2CP6.jpg"))); // NOI18N
        DistritoBTN.setText("Perfiles");
        DistritoBTN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DistritoBTNActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout PaneUbicacionLayout = new javax.swing.GroupLayout(PaneUbicacion);
        PaneUbicacion.setLayout(PaneUbicacionLayout);
        PaneUbicacionLayout.setHorizontalGroup(
            PaneUbicacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PaneUbicacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PaneUbicacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(ViaBTN)
                    .addGroup(PaneUbicacionLayout.createSequentialGroup()
                        .addComponent(DistritoBTN)
                        .addGap(215, 215, 215)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
                .addComponent(TipoViaBTN)
                .addGap(170, 170, 170))
        );
        PaneUbicacionLayout.setVerticalGroup(
            PaneUbicacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PaneUbicacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PaneUbicacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(DistritoBTN)
                    .addComponent(TipoViaBTN))
                .addGap(34, 34, 34)
                .addComponent(ViaBTN)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jtpSeguridad.addTab("Seguridad", PaneUbicacion);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jtpSeguridad, javax.swing.GroupLayout.DEFAULT_SIZE, 914, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jtpSeguridad, javax.swing.GroupLayout.DEFAULT_SIZE, 552, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void vntPersonas(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vntPersonas
    MantenimientoDePersonas vntPersonas = new MantenimientoDePersonas();
    vntPersonas.show();
    // TODO add your handling code here:
}//GEN-LAST:event_vntPersonas

private void VehiculoBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VehiculoBTNActionPerformed
    try {
        MantenimientoDeVehículos vntVehiculos = new MantenimientoDeVehículos();
        // TODO add your handling code here:           
        vntVehiculos.show();

    } catch (SQLException ex) {
        Logger.getLogger(GUI_Principal.class.getName()).log(Level.SEVERE, null, ex);
    }

}//GEN-LAST:event_VehiculoBTNActionPerformed

private void LineaBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LineaBTNActionPerformed
// TODO add your handling code here:
     MantenimientoLineaDeTransporte vntLinea = new MantenimientoLineaDeTransporte();
    vntLinea.show();
}//GEN-LAST:event_LineaBTNActionPerformed

private void EmpresasBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EmpresasBTNActionPerformed
// TODO add your handling code here:
MantenimientoEmpresaDeTransporte vntLinea = new MantenimientoEmpresaDeTransporte();
vntLinea.show();
}//GEN-LAST:event_EmpresasBTNActionPerformed

private void TipoViaBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TipoViaBTNActionPerformed
// TODO add your handling code here:
 MantenimientoRol vntLinea = new MantenimientoRol();
    vntLinea.show();
}//GEN-LAST:event_TipoViaBTNActionPerformed

private void DistritoBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DistritoBTNActionPerformed
// TODO add your handling code here:
     MantenimientoPerfiles vntLinea = new MantenimientoPerfiles();
    vntLinea.show();
}//GEN-LAST:event_DistritoBTNActionPerformed

private void ViaBTNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ViaBTNActionPerformed
        try {
            // TODO add your handling code here:
            MantenimientoUsuarios vntUsuario= new MantenimientoUsuarios();
            vntUsuario.show();
        } catch (SQLException ex) {
            Logger.getLogger(GUI_Principal.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_ViaBTNActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new GUI_Principal().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton AsignacionHorarioBTN;
    private javax.swing.JButton DistritoBTN;
    private javax.swing.JButton EmpresasBTN;
    private javax.swing.JButton LineaBTN;
    private javax.swing.JPanel PaneGeneral;
    private javax.swing.JPanel PaneRuta;
    private javax.swing.JPanel PaneSeguridad;
    private javax.swing.JPanel PaneUbicacion;
    private javax.swing.JButton PersonasBTN;
    private javax.swing.JButton PlantillaHorarioBTN;
    private javax.swing.JButton RutaBTN;
    private javax.swing.JButton TipoViaBTN;
    private javax.swing.JButton VehiculoBTN;
    private javax.swing.JButton ViaBTN;
    private javax.swing.JTabbedPane jtpSeguridad;
    // End of variables declaration//GEN-END:variables
}
